package cn.itcast.zuoyebang;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebView;
import android.widget.TextView;

import cn.itcast.zuoyebang.utils.WebViewUtils;

public class ExerciseActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_exercise);

        WebView webView = findViewById(R.id.webView);
        Intent intent = getIntent();

        String title = intent.getStringExtra("TITLE");
        String url = intent.getStringExtra("URL");

        WebViewUtils.setWebViewSettings(webView);
        WebViewUtils.setWebViewClient(webView);
        webView.loadUrl(url);

        TextView titleTV = findViewById(R.id.exercise_title);
        titleTV.setText(title);




    }
}